Skip to content

FOUR-32805: Server Error message is displayed when Tasks menu is selected - #9005

Merged
nolanpro merged 1 commit into
developfrom
bugfix/FOUR-32805
Aug 21, 2026
Merged

FOUR-32805: Server Error message is displayed when Tasks menu is selected#9005
nolanpro merged 1 commit into
developfrom
bugfix/FOUR-32805

Conversation

@rodriquelca

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

On Octane + FrankenPHP, authenticated requests can crash with:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 100663290 bytes)
at Illuminate/Database/Connection.php:426 (PDOStatement::fetchAll)
134217728 = 128M (PHP default). The worker is not using the CLI memory_limit.

Repro:

  1. Open https:///tasks/search?type=task_all (PMQL task filters / autocomplete).
  2. That endpoint hydrates up to 50 process_requests / tokens including the JSON data column.
  3. php -i and php artisan tinker --execute="echo ini_get('memory_limit');" show 3072M (CLI binary).
  4. FrankenPHP is a different binary. In the container:
/opt/processmaker/frankenphp php-cli -r 'echo ini_get("memory_limit"), PHP_EOL;'
# 128M

Setting PHP_INI / PHPRC in .env does not change the HTTP worker. Without a custom Caddyfile, curl to the worker still returns 128M.

Octane is started as:

php artisan octane:start --server=frankenphp --host=127.0.0.1 --port=8001 --max-requests=500
That command uses the vendor stub Caddyfile, which does not set memory_limit.

Solution

FrankenPHP workers ignore the system/CLI php.ini. Set memory_limit in the project Caddyfile and pass it on start.

Caddyfile (repo root):

php_ini memory_limit {$FRANKENPHP_MEMORY_LIMIT:3072M}
config/octane.php:

'caddy' => [
    'env' => [
        'FRANKENPHP_MEMORY_LIMIT' => env('FRANKENPHP_MEMORY_LIMIT', '3072M'),
    ],
],

.env (optional override):

FRANKENPHP_MEMORY_LIMIT=3072M
Start command — --caddyfile=Caddyfile is required. Without it, Octane uses the vendor stub and stays at 128M:

php artisan octane:start \
  --server=frankenphp \
  --host=127.0.0.1 \
  --port=8001 \
  --max-requests=500 \
  --caddyfile=Caddyfile

This does not change the autocomplete query (SELECT * including data). It only raises the worker cap so that request does not die at 128M.

How to Test

  1. Restart Octane with --caddyfile=Caddyfile.
  2. From the app root:
printf '%s\n' '<?php echo ini_get("memory_limit");' > public/memory-check.php
curl -sS http://127.0.0.1:8001/memory-check.php
 rm public/memory-check.php

Expected: 3072M (or the value of FRANKENPHP_MEMORY_LIMIT).

  1. Restart without --caddyfile and repeat the curl. Expected: 128M.
  2. Hit /tasks/search?type=task_all logged in. Expected: JSON autocomplete, no Allowed memory size ... 134217728 in storage/logs.
  3. Do not use php artisan tinker or php -i to verify the worker. Those are CLI and will still show 3072M even when FrankenPHP is at 128M.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@decisions-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@rodriquelca
rodriquelca requested review from caleeli and gproly August 20, 2026 19:03
@pmPaulis
pmPaulis self-requested a review August 21, 2026 18:42
@nolanpro
nolanpro merged commit 58cf30c into develop Aug 21, 2026
9 checks passed
@nolanpro
nolanpro deleted the bugfix/FOUR-32805 branch August 21, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants